package com.hertz.appr.service.cmd.v1;

import org.apache.commons.cli.CommandLine;

public interface ICmdLineService {
	/*cmdline v1.0 start*/
	public final static String cmdGuess = "guess";
	public final static String cmdPromote = "promote";
	public final static String cmdUpdate = "update";
	
	public final static String oCount = "c";
	public final static String oCountLong = "count";
	public final static String oInterval = "i";
	public final static String oIntervalLong = "interval";
	public final static String oEndtime = "et";
	public final static String oEndtimeLong = "endtime";
	public final static String oAt = "at";
	public final static String oLogic = "l";
	public final static String oLogicLong = "logic";
	public final static String oEnd = "e";
	public final static String oEndLong = "end";
	public final static String oAnswer = "a";
	public final static String oAnswerLong = "answer";
	public final static String typeInt = "int";
	public final static String typeString = "string";
	public final static String oLogicRandom = "random";
	public final static String oLogicOrder = "order";
	/*cmdline v1.0 end*/
	public final static String oReply = "r";
	public final static String oFellow = "f";
	public final static String oRepost = "r";
	public final static String oNote = "n";
	public final static String oHelp = "h";
	public final static String oStart = "s";
	public final static String oView = "v";
	
	public boolean isCmdLine(String cmdLineStr);
	
	/**
	 * stop at non option 
	 * 找不到符合的选项时，抛出异常
	 * 不对参数值进行校验
	 * @param cmdLineStr
	 * @return
	 * @throws Exception
	 */
	public CommandLine buildCmdLine (String cmdLineStr) throws Exception;
	
	public Short getCmdType();
	
	public String checkCommandLine(CommandLine cl);
	
}
